package com.wc.codeforces.思维.Crafting;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2025/1/14 14:33
 * @description
 * https://codeforces.com/contest/2055/problem/B
 */
public class Main {
    /**
     * 思路；
     * 造 一个单位 i, 需要其他所有单位一个
     * 那如果有 0 个需要的, 能建造
     * 如果超过 1 个需要的, 那就无法建造, 因为是互相需要, 一定至少有一个不满足的
     * 如果 = 1, 看需要其他的多少, 够的话就能建造, 反之不行
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 200010;
    static int[] a = new int[N], b = new int[N];
    static int n;

    public static void main(String[] args) {
        int T = sc.nextInt();
        while (T-- > 0) {
            n = sc.nextInt();
            for (int i = 1; i <= n; i++) a[i] = sc.nextInt();
            for (int i = 1; i <= n; i++) b[i] = sc.nextInt();
            int need = 0, num = 0, id = -1;
            for (int i = 1; i <= n; i++) {
                if (b[i] > a[i]) {
                    need++;
                    num = b[i] - a[i];
                    id = i;
                }
            }
            if (need == 0) out.println("YES");
            else if (need > 1) out.println("NO");
            else {
                boolean success = true;
                for (int i = 1; i <= n; i++) {
                    if (i == id) continue;
                    if (a[i] - num < b[i]) {
                        success = false;
                        break;
                    }
                }
                if (success) out.println("YES");
                else out.println("NO");
            }
        }
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}

